<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Rag Hu
 * Created Time: 2019/8/24 23:34
 * Modified Time: 2019/8/24 23:34
 * Version: 2.0
 */

namespace App\Modules\MemberCard\Validators;


class CardTypeControllerValidator
{
    public static function validator()
    {
        return [
            'getCardTypeNum' => [
                'store_id' => [
                    'title' => '店铺id',
                    'rule' => 'required',
                    'message' => []
                ]
            ],
            'getCardTypeService' => [
                'card_type_id' => [
                    'title' => '卡类id',
                    'rule' => 'required',
                    'message' => []
                ]
            ],
            'createCardType' => [
                'store_id' => [
                    'title' => '店铺id',
                    'rule' => 'required',
                    'message' => []
                ],
                'is_general' => [
                    'title' => '是否通用',
                    'rule' => 'required|boolean',
                    'message' => [
                        'is_general.required' => '请选择是否通用'
                    ]
                ],
                'service' => [
                    'title' => '服务信息',
                    'rule' => 'required_if:is_general,0|json',
                    'message' => [
                        'service.required_if'=>'请选择适用服务'
                    ]
                ],
            ],
            'switchCardType' => [
                'card_type_id' => [
                    'title' => '卡类id',
                    'rule' => 'required',
                    'message' => []
                ],
                'status' => [
                    'title' => '状态值',
                    'rule' => 'required',
                    'message' => []
                ],
            ],
            'getCardTypeListPage' => [
                'store_id' => [
                    'title' => '店铺id',
                    'rule' => 'required',
                    'message' => []
                ],
                'status' => [
                    'title' => '状态值',
                    'rule' => 'required',
                    'message' => []
                ],
            ],
            'getCardType' => [
                'card_type_id' => [
                    'title' => '卡类id',
                    'rule' => 'required',
                    'message' => []
                ]
            ],
            'editCardType' => [
                'card_type_id' => [
                    'title' => '卡类id',
                    'rule' => 'required',
                    'message' => []
                ],
                'is_general' => [
                    'title' => '是否通用',
                    'rule' => 'required|boolean',
                    'message' => [
                        'is_general.required' => '请选择是否通用'
                    ]
                ],
                'service' => [
                    'title' => '服务信息',
                    'rule' => 'required_if:is_general,0|json',
                    'message' => [
                        'service.required_if'=>'请选择适用服务'
                    ]
                ],
            ],
            'delCardType' => [
                'card_type_id' => [
                    'title' => '卡类id',
                    'rule' => 'required',
                    'message' => []
                ]
            ],
        ];
    }
}